; Music of Venusis Planet (1989) (Black System) (Luc Guillaume)
; Ripped by Megachur the 26/02/2009

	write "VENUSISP.BIN"

music_date_rip	equ &1a29
music_adr	equ &887a
first_theme	equ 0
last_theme	equ 0	; 0 -> 0

	read "music_header_v1_0.asm"

.l887a
	db #01,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #02,#01,#08,#2f,#12,#42,#02,#02
	db #01,#02,#03,#01,#02,#01,#03,#09
	db #02,#02,#02,#01,#03,#03,#03,#0b
	db #05,#01,#01,#04,#0d,#01,#0c,#04
	db #01,#09,#02,#01,#01,#03,#04,#0c
	db #04,#01,#0c,#04,#01,#0d,#01,#08
	db #01,#0b,#06,#08,#01,#04,#0c,#04
	db #0c,#0d,#08,#09,#01,#03,#01,#01
	db #08,#08,#08,#09,#07,#01,#0d,#01
	db #0a,#0a,#01,#01,#02,#01,#02,#01
	db #03,#03,#01,#0a,#0a,#01,#0a,#09
	db #09,#01,#0b,#01,#0d,#0c,#04,#08
	db #04,#0c,#04,#01,#01,#01,#03,#03
	db #01,#03,#04,#0c,#0d,#01,#0a,#08
	db #0b,#02,#0a,#04,#06,#0a,#01,#09
	db #09,#00,#78,#be,#8c,#a0,#af,#7d
	db #be,#a5,#8c,#b4,#78,#8c,#a0,#b4
	db #00,#8c,#be,#aa,#b4,#96,#a0,#c3
	db #aa,#8c,#be,#b4,#aa,#be,#96,#af
	db #00,#78,#82,#8c,#96,#7d,#91,#87
	db #8c,#96,#00
.l8939 equ $ + 7
.l8932
	db #02,#0a,#ff,#08,#05,#ff,#04,#02
.l8940 equ $ + 6
	db #50,#01,#01,#14,#02,#01,#01,#0f
.l8948 equ $ + 6
.l8944 equ $ + 2
	db #ff,#01,#01,#0f,#ff,#0a,#82,#0a
.l894f equ $ + 5
	db #04,#01,#01,#ec,#01,#01,#0f,#ff
.l8953 equ $ + 1
	db #14,#01,#96,#14,#05,#01,#01,#01
	db #19,#00,#00,#0f,#14,#00,#01,#02
	db #00,#ee,#02,#02,#0f,#0a,#00,#01
	db #01,#00,#ee,#02,#19,#0f,#00,#00
	db #01,#01,#01,#50,#00,#00,#0f,#28
	db #00,#81,#05,#05,#32,#00,#00,#0a
	db #14,#00,#01,#00,#00,#64,#00,#00
	db #0f,#01,#00,#81,#03,#00,#00,#00
	db #06,#00,#00,#00,#01,#04,#04,#28
	db #00,#00,#0f,#00,#00,#00,#00,#06
	db #02,#01,#18,#17,#08,#0a,#09,#0f
	db #10,#12,#1a,#0e,#03,#37,#6e,#4b
	db #a0,#28,#be,#14
	db #87,#46,#50,#5a,#64,#6e,#78,#46
	db #64,#56,#78,#60,#00,#51,#e0,#cc
	db #63,#10,#29,#da,#d0,#cc,#63,#10
	db #29,#d2,#e2,#cc,#63,#10,#29,#59
	db #db,#cc,#63,#10,#29,#57,#c9,#be
	db #58,#1e,#07,#49,#ea,#f7,#5d,#1b
	db #07,#88,#c3,#b4,#5e,#1d,#07
	call #bca7
	ld hl,l8ab1
	call #bcdd
.l89f6
	ld a,#39
	call #bb1e
	jp nz,l89f6
	ld a,(l887a)
	cp #00
	jp z,l8a0b
	xor a
	ld (l887a),a
	ret
.l8a0b
	call #bca7
	xor a
	ld (l8ab9),a
	ld a,#01
	ld (l887a),a
	ld (l8aba),a
	ld de,l8ae3
	ld (l8abc),de
	ld hl,l8ab1
	ld b,#81
	ld c,#00
	ld de,l8a2e
	jp #bcd7
;
.play_music
.l8a2e
;
	di
	push af
	push de
	push hl
	push bc
	push ix
	push iy
	ld a,(l8aba)
	ld b,a
	ld a,(l8ab9)
	inc a
	cp b
	jp z,l8a49
	ld (l8ab9),a
	jp l8a9f
.l8a49
	ld hl,l8ac8
	ld de,(l8abc)
	ld a,(de)
	cp #ff
	call z,l8aa9
	ld a,(de)
	ld (l8acb),a
	inc de
	ld a,(de)
	ld (l8acc),a
	ld hl,l8ad1
	inc de
	ld a,(de)
	ld (l8ad4),a
	ld (l8add),a
	inc de
	ld a,(de)
	ld (l8ad5),a
	ld (l8ade),a
	add #0d
	ld (l8aba),a
	inc de
	ld a,(de)
	ld (l8abb),a
	inc de
	ld (l8abc),de
	ld hl,l8ac8
	call #bcaa
	ld hl,l8ad1
	call #bcaa
	ld a,(l8abb)
	cp #01
	jr nz,l8a9a
	ld hl,l8ada
	call #bcaa
.l8a9a
	ld a,#00
	ld (l8ab9),a
.l8a9f
	pop iy
	pop ix
	pop bc
	pop hl
	pop de
	pop af
	ei
	ret
.l8aa9
	ld de,l8ae3
	ld (l8abc),de
	ret
.l8ab1
	db #f9,#b7,#fb,#b7,#00,#81,#2e,#8a
.l8abe equ $ + 5
.l8abc equ $ + 3
.l8abb equ $ + 2
.l8aba equ $ + 1
.l8ab9
	db #06,#0d,#00,#42,#8b,#02,#01,#00
.l8ac8 equ $ + 7
	db #0a,#0a,#ff,#01,#01,#00,#0a,#01
.l8acc equ $ + 3
.l8acb equ $ + 2
	db #02,#00,#aa,#01,#00,#0d,#19,#00
.l8ad5 equ $ + 4
.l8ad4 equ $ + 3
.l8ad1
	db #02,#02,#00,#d5,#00,#00,#0a,#19
.l8ade equ $ + 5
.l8add equ $ + 4
.l8ada equ $ + 1
	db #00,#04,#02,#00,#d5,#00,#00,#0f
.l8ae3 equ $ + 2
	db #19,#00,#3f,#01,#9f,#00,#00,#52
	db #01,#a9,#00,#00,#aa,#01,#d5,#00
	db #00,#7b,#01,#be,#00,#00,#3f,#01
	db #9f,#00,#00,#52,#01,#a9,#00,#01
	db #1c,#01,#8e,#00,#00,#fd,#00,#7f
	db #00,#00,#ef,#00,#77,#00,#01,#fd
	db #00,#7f,#00,#01,#3f,#01,#9f,#00
	db #01,#1c,#01,#8e,#00,#01,#1c,#01
	db #8e,#00,#00,#3f,#01,#9f,#00,#00
	db #aa,#01,#d5,#00,#01,#7b,#01,#be
	db #00,#01,#3f,#01,#9f,#00,#00,#52
	db #01,#a9,#00,#00,#aa,#01,#d5,#00
	db #00,#7b,#01,#be,#00,#00,#3f,#01
	db #9f,#00,#00,#52,#01,#a9,#00,#01
	db #1c,#01,#8e,#00,#00,#fd,#00,#7f
	db #00,#00,#ef,#00,#77,#00,#01,#fd
	db #00,#7f,#00,#01,#3f,#01,#9f,#00
	db #01,#1c,#01,#8e,#00,#01,#1c,#01
	db #8e,#00,#00,#3f,#01,#9f,#00,#00
	db #aa,#01,#d5,#00,#01,#7b,#01,#be
	db #00,#01,#fd,#00,#7f,#00,#00,#fd
	db #00,#7f,#00,#00,#fd,#00,#7f,#00
	db #01,#fd,#00,#7f,#00,#01,#1c,#01
	db #8e,#00,#00,#1c,#01,#8e,#00,#00
	db #1c,#01,#8e,#00,#01,#1c,#01,#8e
	db #00,#01,#3f,#01,#9f,#00,#00,#3f
	db #01,#9f,#00,#00,#3f,#01,#9f,#00
	db #01,#3f,#01,#9f,#00,#01,#fd,#00
	db #7f,#00,#00,#1c,#01,#8e,#00,#00
	db #3f,#01,#9f,#00,#00,#1c,#01,#8e
	db #00,#00,#fd,#00,#7f,#00,#00,#ff
;
.init_music	; added by Megachur (&7524)
;
	ld a,#01
	ld hl,l8932
	call #bcbc
	ld a,#01
	ld hl,l8939
	call #bcbf
	ld a,#02
	ld hl,l8abe
	call #bcbc
	ld a,#03
	ld hl,l8940
	call #bcbc
	ld a,#04
	ld hl,l8944
	call #bcbc
	ld a,#04
	ld hl,l8948
	call #bcbf
	ld a,#05
	ld hl,l894f
	call #bcbc
	ld a,#05
	ld hl,l8953
	call #bcbf
	jp l8a0b
;
.game_name
	db "Venusis Planet",0
.game_year
	db "1989",0
.game_publisher
	db "Black System",0
.music_author
	db "Luc Guillaume",0
.music_comment
	db "",0

	read "music_end_v1_0.asm"
